package com.zhoug.demo.player.http;

import com.google.gson.annotations.SerializedName;

import com.zhoug.common.beans.BaseBean;
import com.zhoug.common.utils.StringUtils;

import java.util.Comparator;

/**
 * 企业摄像头
 *
 * @Author 35574
 * @Date 2020/9/7
 * @Description
 */
public class FirmMonitor extends BaseBean {
    //协议类型
    public static final int PROTOCOL_HLS = 0;//.m3u8
    public static final int PROTOCOL_RTSP = 1;//rtsp
    public static final int PLAT_DAHUA = 9;//大华
    public static final int PLAT_HIK = 3;//海康
    public static final int PLAT_ELECTRIC = 2;//电信平台


    private String Id;
    private String AreaId;//行政区域Id
    private String AreaName;//区域名称
    private String FirmId;//企业id
    private String FirmName;//企业名称
    @SerializedName(value = "CameraName", alternate = "Name")
    private String Name;//摄像头名称
    private String MonitorId;//摄像头ID


    private String Model;//摄像头型号
    /**
     */
    private int MonitorType;//摄像头类型 枚举：1、7600平台（犍为平台）2、千里眼小微平台 3、千里眼行业平台 4、行业ISC平台（晋城平台）
    private String CameraTypeName;//摄像头类型名称 ,暂时未用
    private String MonitorTypeName;//摄像头类型名称 ,
    private String PhaseId;//房间Id
    private String PhaseName;//房间名称
    private String MonitorPhaseMapFirmIcon;//房间图标
    private String MonitorPhaseIconSet;
    private String PlatId;//平台Id
    private int PlatType;//平台类型
    private String PlatName;// 平台名称


    /**
     * 摄像头播放地址（视频第三方平台的唯一标识）：
     * 小微平台：播放地址(http://XXX)
     * 行业平台：摄像头VideoId信息(VI_QLYMonitor VideoId) ,
     */
    private String PlayUrl;//
    private String PicUrl;//图片地址
    private String BasePalyUrl;//标清地址
    private String CreateTime;//创建时间
    /**
     */
    private int OnlineStatus;//是否在线
    private boolean IsDeleted;//
    private boolean ShowWatermark;//是否显示水印
    private String WaterMark;//水印
    private boolean IsH265;//是否是H265摄像头
    private boolean IsCorridor;//是否是H265摄像头
    private String FirmTypeName;// 企业类型名称 ,
    private String AreaCode;// 存储国家的区域编码，方便快速查询 ,
    private String DataAreaCode;// 分库区域字段 ,

    public boolean isOnline() {
        return OnlineStatus == 1;
    }

    public String getId() {
        return Id;
    }

    public void setId(String Id) {
        this.Id = Id;
    }

    public String getAreaId() {
        return AreaId;
    }

    public void setAreaId(String AreaId) {
        this.AreaId = AreaId;
    }

    public String getAreaName() {
        return AreaName;
    }

    public void setAreaName(String AreaName) {
        this.AreaName = AreaName;
    }

    public String getFirmId() {
        return FirmId;
    }

    public void setFirmId(String FirmId) {
        this.FirmId = FirmId;
    }

    public String getFirmName() {
        return FirmName;
    }

    public void setFirmName(String FirmName) {
        this.FirmName = FirmName;
    }

    public String getName() {
        return Name;
    }

    public void setName(String Name) {
        this.Name = Name;
    }

    public String getModel() {
        return Model;
    }

    public void setModel(String Model) {
        this.Model = Model;
    }

    public int getMonitorType() {
        return MonitorType;
    }

    public void setMonitorType(int MonitorType) {
        this.MonitorType = MonitorType;
    }

    public String getPhaseId() {
        return PhaseId;
    }

    public void setPhaseId(String PhaseId) {
        this.PhaseId = PhaseId;
    }

    public String getPlatId() {
        return PlatId;
    }

    public void setPlatId(String PlatId) {
        this.PlatId = PlatId;
    }

    public String getPhaseName() {
        return PhaseName;
    }

    public void setPhaseName(String phaseName) {
        PhaseName = phaseName;
    }

    public String getPlayUrl() {
        return PlayUrl;
    }


    public void setPlayUrl(String PlayUrl) {
        this.PlayUrl = PlayUrl;
    }

    public String getPicUrl() {
        return PicUrl;
    }

    public void setPicUrl(String PicUrl) {
        this.PicUrl = PicUrl;
    }

    public String getBasePalyUrl() {
        return BasePalyUrl;
    }

    public void setBasePalyUrl(String BasePalyUrl) {
        this.BasePalyUrl = BasePalyUrl;
    }

    public String getCreateTime() {
        return CreateTime;
    }

    public void setCreateTime(String CreateTime) {
        this.CreateTime = CreateTime;
    }

    public boolean isIsDeleted() {
        return IsDeleted;
    }

    public void setIsDeleted(boolean IsDeleted) {
        this.IsDeleted = IsDeleted;
    }


    public String getMonitorId() {
        return MonitorId;
    }

    public void setMonitorId(String monitorId) {
        MonitorId = monitorId;
    }

    public String getCameraTypeName() {
        return CameraTypeName;
    }

    public void setCameraTypeName(String cameraTypeName) {
        CameraTypeName = cameraTypeName;
    }

    public String getMonitorPhaseMapFirmIcon() {
        return MonitorPhaseMapFirmIcon;
    }

    public void setMonitorPhaseMapFirmIcon(String monitorPhaseMapFirmIcon) {
        MonitorPhaseMapFirmIcon = monitorPhaseMapFirmIcon;
    }

    public String getMonitorPhaseIconSet() {
        return MonitorPhaseIconSet;
    }

    public void setMonitorPhaseIconSet(String monitorPhaseIconSet) {
        MonitorPhaseIconSet = monitorPhaseIconSet;
    }

    public String getPlatName() {
        return PlatName;
    }

    public void setPlatName(String platName) {
        PlatName = platName;
    }

    public int getOnlineStatus() {
        return OnlineStatus;
    }

    public void setOnlineStatus(int onlineStatus) {
        OnlineStatus = onlineStatus;
    }

    public boolean isDeleted() {
        return IsDeleted;
    }

    public void setDeleted(boolean deleted) {
        IsDeleted = deleted;
    }

    public boolean isShowWatermark() {
        return ShowWatermark;
    }

    public void setShowWatermark(boolean showWatermark) {
        ShowWatermark = showWatermark;
    }

    public String getWaterMark() {
        return WaterMark;
    }

    public void setWaterMark(String waterMark) {
        WaterMark = waterMark;
    }

    public boolean isH265() {
        return IsH265;
    }

    public void setH265(boolean h265) {
        IsH265 = h265;
    }

    public boolean isCorridor() {
        return IsCorridor;
    }

    public void setCorridor(boolean corridor) {
        IsCorridor = corridor;
    }

    public String getMonitorTypeName() {
        return MonitorTypeName;
    }

    public void setMonitorTypeName(String monitorTypeName) {
        MonitorTypeName = monitorTypeName;
    }

    public String getFirmTypeName() {
        return FirmTypeName;
    }

    public void setFirmTypeName(String firmTypeName) {
        FirmTypeName = firmTypeName;
    }

    public String getAreaCode() {
        return AreaCode;
    }

    public void setAreaCode(String areaCode) {
        AreaCode = areaCode;
    }

    public String getDataAreaCode() {
        return DataAreaCode;
    }

    public void setDataAreaCode(String dataAreaCode) {
        DataAreaCode = dataAreaCode;
    }

    /**
     * 是否是海康平台
     *
     * @return
     */
    public boolean isHikVision() {
        if (!StringUtils.isNullOrEmpty(PlayUrl)) {
            if (PlayUrl.startsWith("http")) {
                return false;
            } else {
                return true;
            }
        }
        return false;
    }

    public int getPlatType() {
        return PlatType;
    }

    public void setPlatType(int platType) {
        PlatType = platType;
    }
    public int getPlat() {
        if (PlatType == 0) {
            if ("5227419750125099214".equals(PlatId)) {
                PlatType = PLAT_DAHUA;
            }
        }
        return PlatType;
    }


}
